package com.zy.edu.controller;


import com.zy.edu.bean.CourseChapter;
import com.zy.edu.bean.CourseChapterVideoStu;
import com.zy.edu.bean.InputParam;
import com.zy.edu.service.CourseChapterService;
import com.zy.edu.service.CourseChapterVideoStuService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author HuangHaiShui
 * @since 2021-07-27
 */
@RestController
@RequestMapping("/videoStu")
public class CourseChapterVideoStuController {
    @Resource
    CourseChapterVideoStuService courseChapterVideoStuService;

    /**
     * @Author: HuangHaiShui
     * @Description: 创建或修改学生的视频观看数据
     * @Date: 9:17 2021/7/14
     * @param courseChapterVideoStu:
     * @return: Map
     **/
    @RequestMapping("/edit")
    public Map edit( CourseChapterVideoStu courseChapterVideoStu, InputParam inputParam){
        return courseChapterVideoStuService.saveOrUpdate(courseChapterVideoStu,inputParam);
    }

    @RequestMapping("/dele")
    public Map dele( CourseChapterVideoStu courseChapterVideoStu){
        return courseChapterVideoStuService.dele(courseChapterVideoStu);
    }
    @RequestMapping("/info")
    public Map getById(CourseChapterVideoStu courseChapterVideoStu, InputParam inputParam){

        return courseChapterVideoStuService.info(courseChapterVideoStu, inputParam);
    }
}

